#include"DoubleLinkList.h"
#include<iostream>
#include<cstring>


void MyPrintChar(DoubleLinkList::ElementType element)
{
    char* p = (char*)element;
    std::cout<<p;
    std::cout<<" ";
}

bool CompareIsEqual(DoubleLinkList::ElementType element1,DoubleLinkList::ElementType element2)
{
    char* p1 = (char*)element1;
    char* p2 = (char*)element2;
    
    return strcmp(p1,p2) == 0;
}


int main()
{
   char a[5]= "abcd";
    char b[5]= "efgh";
    
    DoubleLinkList l1;
    
    l1.InsertTail(a);
    l1.InsertTail(b);
    
    l1.SetPrint(MyPrintChar);
    
    l1.show();
    
    l1.SetCompare(CompareIsEqual);
    l1.RemoveElement(a);
    l1.show();
    return 0;
}




















